<template>
  <div class="hello">
    <div class="column is-12">
      <label class="label" for="email">Email</label>
      <div class="layui-block">
        <input v-model="email" v-validate="'required|email'" :class="{'input': true, 'is-danger': errors.has('email') }" type="text" name="email" class="layui-input" placeholder="账户">
        <span v-show="errors.has('email')" class="text-style" v-cloak> {{ errors.first('email') }} </span>
      </div>
      <div class="layui-block">
        <input v-model="name" v-validate="'required|min:3|alpha'" :class="{'input': true, 'is-danger': errors.has('name') }" type="text" name="name" class="layui-input" placeholder="账户">
        <span v-show="errors.has('name')" class="text-style" v-cloak> {{ errors.first('name') }} </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    name: "HelloWorld",
    data() {
        return {
            email: "",
            name: ""
        };
    },
    methods: {}
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
    font-weight: normal;
}
ul {
    list-style-type: none;
    padding: 0;
}
li {
    display: inline-block;
    margin: 0 10px;
}
a {
    color: #42b983;
}
</style>
